package com.han.observer;

/**
 * @ClassName Client
 * @Description 描述该类的功能
 * @Author duoduo Han
 * @Date 2024/6/17 11:13
 */
public class Client {
    public static void main(String[] args) {
        //创建公众号对象
        SubcriptionSubject subject = new SubcriptionSubject();
        //订阅公众号
        subject.attach(new WeixinUser("孙悟空"));
        subject.attach(new WeixinUser("猪悟能"));
        subject.attach(new WeixinUser("沙悟净"));

        //公众号更新
        subject.notifyObserver("韩非子在线课!");
    }
}
